package com.hwtx.form.domain.def.meta;

import lombok.Getter;

@Getter
public enum FixSize {
    SM("sm", "较小"),
    MD("md", "标准"),
    LG("lg", "较大"),
    XL("xl", "很大"),
    FULL("full", "满幕");

    private final String size;
    private final String label;

    FixSize(String size, String label) {
        this.size = size;
        this.label = label;
    }

    public static FixSize fromSize(String size) {
        for (FixSize fixSize : FixSize.values()) {
            if (fixSize.getSize().equals(size)) {
                return fixSize;
            }
        }
        return null;
    }
}